const Biz = require('../biz/index');
const fw = require('../core/framework');
const exception = require('../exception');
const SMS = require('../sms');

module.exports = {
    init(router,urlencodedParser){
        router.post('/sms/alarm', urlencodedParser, function (req, res) {
            let param = fw.utils.parseBody(req);
            // let cData = {
            //     mobile:param.account,
            //     password:param.password,
            // };
            SMS('13817514341','917140',['张三','二楼拐角','10点20分','跌倒']).then(function(){
                res.send({code : 0,msg : '成功'})
            }).catch(function(err){
                res.send({code : -1,msg : '失败'})
            })
        });
    }
};
